package com.maserb.monitor.service.common.impl;

import com.maserb.monitor.entity.JwRegistrationEntity;
import com.maserb.monitor.repository.JwRegistrationRepository;
import com.maserb.monitor.service.base.impl.JpaSpecificationServiceImpl;
import com.maserb.monitor.service.common.JwRegistrationService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JwRegistrationServiceImpl extends JpaSpecificationServiceImpl<JwRegistrationRepository,
        JwRegistrationRepository, JwRegistrationEntity, String>
        implements JwRegistrationService {

    @Override
    public List<JwRegistrationEntity> findByCreateTimeGreaterThanEqual(String time) {
        return(this.repository.findByCreateTimeGreaterThanEqual(time));
    }

    @Override
    public List<JwRegistrationEntity> findByUuidAndRegistrationId(String uuid, String registrationId) {
        return (this.repository.findByUuidAndRegistrationId(uuid,registrationId));
    }

    @Override
    public List<JwRegistrationEntity> findByUuid(String uuid) {
        return this.repository.findByUuid(uuid);
    }
}